In Project Builder, modify the showDetails action in Main.java to look like the following:
public MovieDetails showDetails() {
MovieDetails nextPage =
(MovieDetails)pageWithName("MovieDetails");
// Initialize your component here
EOEnterpriseObject selection =
(EOEnterpriseObject)movieDisplayGroup.selectedObject();
nextPage.setSelectedMovie(selection);
return nextPage;
}
This method creates the MovieDetails page and then invokes its setSelectedMovie method with the movie that's selected in the Main page. The display group method selectedObject returns its selected object, which, in the Main component, is set when a user clicks a movie title hyperlink.